package com.yuhs.zixing.study.dubbo.consumer.controller;

import com.yuhs.zixing.study.dubbo.provider.DubboProviderService;
import lombok.extern.slf4j.Slf4j;
import org.apache.dubbo.config.annotation.DubboReference;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName DubboConsumerController
 * @Description DubboConsumerController
 * @Author yuhs
 * @CreateDate 2021/7/1
 **/
@Slf4j
@RestController
public class DubboConsumerController {

    @DubboReference(check = false)
    DubboProviderService dubboProviderService;


    @RequestMapping("/testDubbo")
    public String testDubbo(String aa) {

        final String aaa = dubboProviderService.testDubboProviderService(aa);
        log.info("dubbo 获取结果：{}", aaa);
        return aaa;
    }


}
